package com.alib.springcloud.controller;


import com.alib.springcloud.service.OrderService;
import javafx.beans.DefaultProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/consumer/payment/hystrix/ok/{id}")
    public String paymentInfo_OK(@PathVariable("id") Integer id){
       return orderService.paymentInfo_OK(id);
    }

    @GetMapping("/consumer/payment/hystrix/error/{id}")
    public String paymentInfo_Error(@PathVariable("id") Integer id){
        return orderService.paymentInfo_Error(id);
    }

}
